package day04.Single_Class;

/*
*   懒汉式 单例类
* */

public class Single_way1 {
    private static Single_way1 single;

    private Single_way1()
    {

    }

    public static synchronized  Single_way1 getInstance()
    {
        if(single==null)
        {
            single=new Single_way1();
            return single;
        }

        return single;
    }
}
